<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<hr>
<#--声明一个变量-->
<#assign mname111="hhhh"/>
<!--打印输出username变量-->
${mname111}
<hr>
<#--controller的requestScope作用域-->
<!--打印输出user对象的具体相关属性-->
${member111.mid}===
${member111.mpwd}===
<hr>
<!--打印输出user对象的name属性，如果name为空,则转换默认值为"xxx"-->
${member111.mname!"账号为空"}
<hr>
<!--格式化输出日期-->
${member111.startTime?string("yyyy-MM-dd HH:mm:ss zzzz")}===<br>
<hr>
<!--判断-->
<#if member111.age lt 18>
    ${member111.mname}未满18周岁
<#elseif member111.age lte 24>
    ${member111.mname}在18周岁~~24周岁之间
<#elseif member111.age gte 30 >
    ${member111.mname}至少30周岁,实际是${member111.age}周岁
<#else >
    ${member111.mname}大于24周岁~~小于30周岁
</#if>
<hr>
空值判断有2种写法
<!--空值判断有2种写法-->
<!--DEMO1-->
===${mname}
<!--DEMO1-->
<div>方法1</div>
<#if member111.mname?exists>
    mname的值:==${member111.mname}
<#else >
    mname的值为空
</#if>
<!--DEMO1-->
<div>方法2</div>
<#if member111.mname??>
    mname的值:==${member111.mname}
<#else >
    mname的值为空
</#if>
<hr>
<#include "/index.jsp"/>
<hr>
<!--测试定义userlist数组变量-->
<#assign userlist = ["旺达","李二","张三"]/>
<#--判断长度-->
<hr>
<#if (userlist?size!=0)>
        ${userlist}的长度不为零
</#if>
<hr>
<#list userlist as ul>
    <br>${ul_index}=====${ul}
</#list>
<hr>
<!--取出session中的对象-->
${Session["member222"]}
<hr>
${Session["member222"].mid}<br>
${Session["member222"].mname}<br>
${Session["member222"].mpwd}<br>
${Session["member222"].age}<br>
${Session["member222"].startTime}<br>
<hr>

</body>
</html>
<script type="text/javascript">
    //http://localhost:8080/toLogin.dojava
    //http://localhost:8080/FreeMarker/login.ftl
    console.log("111");
</script>